package com.middlegroup.subjectpay.service.empty;

import com.middlegroup.common.model.TransRequest;
import com.middlegroup.common.model.TransResult;
import org.springframework.stereotype.Service;

/**
 *
 * @author pc
 * @date 2019/1/24
 */
@Service
public class EmptyService {

    /**模拟代付
     * @param request
     * @return
     */
    public TransResult df(TransRequest request){
        TransResult transResult = new TransResult();
        transResult.setMerchantBillNo(request.getMerchantBillNo());
        transResult.setBillNo(request.getBillNo());
        transResult.setAmount(request.getAmount());
        transResult.setTransStatus(1);
        transResult.setMsg("模拟渠道放款成功!");
        transResult.setTransTime(System.currentTimeMillis());
        return transResult;
    }

    /**模拟代收
     * @param request
     * @return
     */
    public TransResult deduct(TransRequest request){
        TransResult transResult = new TransResult();
        transResult.setMerchantBillNo(request.getMerchantBillNo());
        transResult.setBillNo(request.getBillNo());
        transResult.setAmount(request.getAmount());
        transResult.setTransStatus(1);
        transResult.setMsg("模拟代扣渠道还款成功!");
        transResult.setTransTime(System.currentTimeMillis());
        return transResult;
    }

    /**模拟协议支付
     * @param request
     * @return
     */
    public TransResult protocolPay(TransRequest request){
        TransResult transResult = new TransResult();
        transResult.setMerchantBillNo(request.getMerchantBillNo());
        transResult.setBillNo(request.getBillNo());
        transResult.setAmount(request.getAmount());
        transResult.setTransStatus(1);
        transResult.setMsg("模拟协议支付渠道还款成功!");
        transResult.setTransTime(System.currentTimeMillis());
        return transResult;
    }

    /**模拟快捷支付
     * @param request
     * @return
     */
    public TransResult quickPay(TransRequest request){
        TransResult transResult = new TransResult();
        transResult.setMerchantBillNo(request.getMerchantBillNo());
        transResult.setBillNo(request.getBillNo());
        transResult.setAmount(request.getAmount());
        transResult.setTransStatus(1);
        transResult.setMsg("模拟快捷支付渠道还款成功!");
        transResult.setTransTime(System.currentTimeMillis());
        return transResult;
    }
}
